<?php

namespace catchAdmin\ce\model;

use catcher\base\CatchModel as Model;
/**
 *
 * @property int $id
 * @property string $name
 * @property int $created_at
 * @property int $updated_at
 * @property int $deleted_at
 * @property int $creator_id
 */
class Ceshi extends Model
{
    
    public $field = [
        //
        'id',
        // 名字
        'name',
        // 创建时间
        'created_at',
        // 更新时间
        'updated_at',
        // 软删除字段
        'deleted_at',
        // 创建人ID
        'creator_id',
    ];
    
    public $name = 'ceshi';


    public function getList()
    {


        return $this->catchSearch()
            ->field('*')

//            ->where('status',0)
            ->catchOrder()
            ->creator()
            ->paginate();
    }


    public function searchNameAttr($query, $value, $data)
    {
        $query->where('name','like','%'. $value . '%');
    }

}



